﻿using System;
using System.Collections;

using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using CRUD.DAO;
using CapaGestion.Spring;
using GestionadorBaseDatos;
using System.Web.UI.MobileControls;
using CapaNegocios;

public partial class InterfazKamalde_AdministradorFormasPago : Base
{
    protected void Page_Load(object sender, EventArgs e)
    {
        IGestionFormaPago gestionarFormasPago = AdministradorGestion.getGestionarFormaPago();
        IList listaFormasPago = gestionarFormasPago.GetAll();


        TableRow fila;
        TableRow filaInfo = new TableRow();
        TableCell columna;
        TableCell columna2;
        TableCell columna3;


        DropDownList listaEstatus;


        TableCell columnaEstatus = new TableCell();
        columnaEstatus.Text = "Estatus";
        columnaEstatus.BorderColor = System.Drawing.Color.Black;
        columnaEstatus.BackColor = System.Drawing.Color.Black;
        columnaEstatus.BorderStyle = BorderStyle.Solid;
        columnaEstatus.BorderWidth = 1;
        columnaEstatus.ForeColor = System.Drawing.Color.Yellow;
        columnaEstatus.Font.Name = "Calibri";
        columnaEstatus.Font.Size = 14;

        
        TableCell columnaDescripcion = new TableCell();
        columnaDescripcion.Text = "Descripcion";
        columnaDescripcion.BorderColor = System.Drawing.Color.Black;
        columnaDescripcion.BackColor = System.Drawing.Color.Black;
        columnaDescripcion.BorderStyle = BorderStyle.Solid;
        columnaDescripcion.BorderWidth = 1;
        columnaDescripcion.ForeColor = System.Drawing.Color.Yellow;
        columnaDescripcion.Font.Name = "Calibri";
        columnaDescripcion.Font.Size = 14;
        
        TableCell columnaNombre = new TableCell();
        columnaNombre.Text = "Nombre"; 
        columnaNombre.BorderColor = System.Drawing.Color.Black;
        columnaNombre.BackColor = System.Drawing.Color.Black;
        columnaNombre.BorderStyle = BorderStyle.Solid;
        columnaNombre.BorderWidth = 1;
        columnaNombre.ForeColor = System.Drawing.Color.Yellow;
        columnaNombre.Font.Name = "Calibri";
        columnaNombre.Font.Size = 14;

        filaInfo.Cells.Add(columnaDescripcion);
        filaInfo.Cells.Add(columnaNombre);
        filaInfo.Cells.Add(columnaEstatus);
        test.Rows.Add(filaInfo);



        int count = 0;
        int tamano = listaFormasPago.Count;
       
        //Label texto = new Label();
        //texto.Text = "hey";
        //texto.ForeColor = System.Drawing.Color.White;
        test.BorderColor = System.Drawing.Color.Black;
        test.HorizontalAlign = HorizontalAlign.Center;
        test.BorderWidth = 0;
        while (count < tamano)
        {
            listaEstatus = new DropDownList();
          
            fila = new TableRow();
            columna = new TableCell();
            columna2 = new TableCell();
            columna3 = new TableCell();
            
            FormaPago pago = (FormaPago)listaFormasPago[count];
            
            columna.BorderColor = System.Drawing.Color.Black;
            columna.BorderStyle = BorderStyle.Solid;
            columna.BorderWidth = 1;
            
            columna2.BorderColor = System.Drawing.Color.Black;
            columna2.BorderStyle = BorderStyle.Solid;
            columna2.BorderWidth = 1;
            
            columna.Font.Name = "Calibri";
            columna.Font.Size = 12;
            
            columna2.Font.Name = "Calibri";
            columna2.Font.Size = 12;
            
            columna.Text = pago.Descripcion;
            columna2.Text = pago.Nombre;

            listaEstatus.Items.Add("Activar");
            listaEstatus.Items.Add("Desactivar");
            columna3.Controls.Add(listaEstatus);
            
            fila.Cells.Add(columna);
            fila.Cells.Add(columna2);
            fila.Cells.Add(columna3);
            
            test.Rows.Add(fila);
            
            count++;
        }

       
        //columna.Text = "heeey";
        //columna2.Text = "como stas";
        //fila.Cells.Add(columna);
        //fila.Cells.Add(columna2);
       

        //test.Rows.Add(fila);

        

    }
}
